home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-03-26 | 1.5 KB | 52 lines | [TEXT/QED1] |
- /* FILE = RocketView.h */
-
- #import <appkit/appkit.h>
-
- #define MAXMISSLES 5
-
- @interface RocketView : View
- /* subclass of view */
- {
- /* all instance variables are private by default. */
-
- NXPoint misslePositions[MAXMISSLES];
- BOOL misslesLaunched;
- int numRockets;
-
- /* we could have created an array of missle objects instead of this array,
- and allowed more flexibility in modifying this program later... */
-
- id BlaunchRockets;
- /* launch rocket button */
-
- id IFnumberRockets;
- /* input text field = a Form object */
- }
-
- + newFrame: (const NXRect *) frameRect;
- /* override View's default newFrame method */
-
- - updatedrawing;
- /* draws the missles in the view */
-
- - drawSelf: (const NXRect *) rects : (int) rectCount;
- /* override View's default drawing method -- we don't call this directly.
- drawSelf:: gets called when the window/view objects are first displayed, and
- at certain other times, such as in response to the printPScode: message. By
- properly defining this routine, the program can automatically support
- printing as well as displaying -- so long as you don't use certain Display
- PostScript extensions, such as compositing bitmaps! */
-
- - setBlaunchRockers:anObject;
- /* created by interface builder */
-
- - setIFnumberRockets:anObject;
- /* created by interface builder */
-
- - rocketlaunch:sender;
- /* in this program, this sender will always be the button named "Launch
- Rockets" and this routine will be called when the user clicks in this button
- object during execution of this program */
-
- @end
-